package org.thread.test05.syn.homework.demo03;


/**
 * @author CSY
 * @date 2025 - 03 - 12
 */
public class MainTest {

    public static void main(String[] args) {
        //实例化一个账号对象
        Account account = new Account(5000);
        //实例化Runnable对象
        MyRunnable mr01 = new MyRunnable(account,"老公",3000);
        MyRunnable mr02 = new MyRunnable(account,"老婆",4000);

        //实例化线程对象
        Thread t01 = new Thread(mr01);
        Thread t02 = new Thread(mr02);
        //启动
        t01.start();
        t02.start();
    }
}
